package com.ExaminStudy.YuanMianJI;

public class Yuan extends Shape{
    public Yuan() {
    }

    public Yuan(double radius) {
        this.radius = radius;
    }

    private  double radius;

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public double Pai=3.14;
    @Override
    public double getArea() {

        return radius*radius*3.14;
    }

    @Override
    public double getPerimeter() {

        return 2*3.14*radius;
    }
//    public abstract class shape {// 抽象类
//        public abstract double getArea();// 求面积
//        public abstract double getPerimeter(); // 求周长
//    }

}
